package com.lin.operatorlogrecord.entity.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lin.operatorlogrecord.entity.annotation.FieldIdentifyAnnotation;
import com.lin.operatorlogrecord.entity.constant.TableNameConstant;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@TableName(TableNameConstant.STUDENT)
public class Student {

    /**
     * 主键，不支持为null
     */
    @TableId(value = "obj_id", type = IdType.ASSIGN_ID)
    private String objId;

    /**
     * 账号，不支持为null
     */
    @TableField("age")
    @FieldIdentifyAnnotation(filedName = "年龄", priority = 2)
    private Integer age;

    /**
     * 姓名，不支持为null
     */
    @TableField("name")
    @FieldIdentifyAnnotation(filedName = "姓名", priority = 1, isObjectName = true)
    private String name;

    /**
     * 邮箱，不支持为null
     */
    @TableField("clazz")
    @FieldIdentifyAnnotation(filedName = "班级", priority = 3)
    private String clazz;
}
